load("//tools/build_defs/android:fb_xplat_android_cxx_library.bzl", "fb_xplat_android_cxx_library")
load("//tools/build_defs/oss:profilo_defs.bzl", "profilo_path")

fb_xplat_android_cxx_library(
    name = "reader",
    srcs = [
        "MmapBufferHeaderReader.cpp",
    ],
    header_namespace = "profilo/mmapbuf/header",
    allow_jni_merging = True,
    compiler_flags = [
        "-fexceptions",
        "-std=gnu++14",
        "-DLOG_TAG=\"Profilo/Mmap\"",
    ],
    labels = [],
    soname = "libprofilo_mmapbuf_rdr.$(ext)",
    visibility = [
        profilo_path("..."),
    ],
    deps = [
        ":header",
        profilo_path("cpp:profilo"),
        profilo_path("deps/fbjni:fbjni"),
    ],
)

fb_xplat_android_cxx_library(
    name = "header",
    header_namespace = "profilo/mmapbuf/header",
    exported_headers = [
        "MmapBufferHeader.h",
    ],
    allow_jni_merging = True,
    compiler_flags = [
        "-fexceptions",
        "-std=gnu++14",
        "-DLOG_TAG=\"Profilo/Mmap\"",
    ],
    force_static = True,
    labels = [],
    visibility = [
        profilo_path("..."),
    ],
)
